package conf

import (
	"fmt"
	"github.com/spf13/viper"
)

type AppConfig struct {
	Mysql Mysql
	Redis Redis
}
type Mysql struct {
	User     string
	Pass     string
	Host     string
	Port     string
	Database string
}

type Redis struct {
	Pass string
	Host string
	Port string
}

var AppConf AppConfig

func Init() {
	viper.SetConfigFile("./conf/conf.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&AppConf)
	fmt.Println(AppConf)
}
